<?php 
if($att['effect'] == 0)
{ echo $shop->CurrentProduct->getAttributeValue($att['id']); }
else
{
	//print_r($att);
	if($att['type'] == 2)
	{
		echo '<div class="form-group">';
		?><label for="<?php echo $att['title']; ?>"><?php echo $att['title']; ?></label><div class="clearfix"></div><?php 
		foreach($shop->getProductAttribute($att['id'])->getValues() as $val)
		{
			$vr = $shop->CurrentProduct->getVariationByAttributeValueId($att['id'], $val->getId());
			if(($val->getActive()) && ($vr->getActive()) && (($shop->getProductAttribute($att['id'])->getDisplayAll()) || is_object($vr)))
			{		
				$selected = '';
				if($_POST['a_'.$att['id'].'_v'] > 0)
				{
					if($_POST['a_'.$att['id'].'_v'] == $val->getId())
					{ $selected = 'checked="checked"'; }
				}
				else
				{
					if($val->getId() == $shop->CurrentProduct->Variations[$shop->CurrentProduct->getCurrentVariationId()]->getAttributeValueId($att['id']))
					{ $selected = 'checked="checked"'; }
				}
			
				if($theme->getBootstrap() > 0)
				{ echo '<div class="radio"><label>'; }
				
				echo '<input onchange="valuesChanged()" onclick="valuesChanged()" type="radio" name="a_'.$att['id'].'_v" '.$selected.'  value="'.$val->getId().'" ';
				//echo ' onchange="setAttributeValue('.$att['id'].', this.value);" />';
				echo ' /> ';
				//echo '<span class="value">';
				echo $val->getValue();
				if($att['val_types'] == 3)
				{
					$pfv = $shop->CurrentProduct->Variations[$shop->CurrentProduct->getFirstVariationId()]->getStdPrice($shop->getSetting('tax_included_prices'), 0, false);
					if($val->getValuePrice() > 0)
					{  
						$pav = $val->getValuePrice(true, 2);
						
						echo '&nbsp;kr. '.number_format(round(($pfv+$pav),1),0,'','').' kr.'; 
					}
					else
					{  echo '&nbsp;kr. '.$shop->CurrentProduct->Variations[$shop->CurrentProduct->getFirstVariationId()]->getStdPrice($shop->getSetting('tax_included_prices'), 2, false).' kr.'; }
				}
				else
				{
					if($val->getValuePrice() > 0)
					{  echo '&nbsp;(+&nbsp;'.$val->getValuePrice($shop->getSetting('tax_included_prices'), 2, false).' kr.)'; }
				}
				//echo '</span>';
				
				if($theme->getBootstrap() > 0)
				{ echo '</label></div>'; }
				else
				{ echo '<br />'; }
			}
		}
		echo '</div><div class="form-group"></div>';
	}
}
?>